import Vue from 'vue'
import VueRouter from 'vue-router'
import HomeView from '@/views/HomeView.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'HomeView',
    component: HomeView,//CultureTourism,
    redirect:'/home',
    children:[
      {
        path:'/home',
        name: 'home',
        component:()=>import('@/views/homePage/homePage.vue'),
      },
      {
        path:'/culture',
        name: 'culture',
        component:()=>import('../views/cultureTourism/CultureTourism.vue'),
      },
      {
        path: '/picture',
        name: 'picture',
        component: () => import('../views/cultureTourism/picturePreview/index.vue')
      },
      {
        path: '/audio',
        name: 'audio',
        component: () => import('../views/travel/index.vue')
      },
      {
        path: '/video',
        name: 'video',
        component: () => import('@/views/cultureTourism/video/video.vue')
      }
    ]
  },
  // {
  //   path: '/picture',
  //   name: 'picture',
  //   // route level code-splitting
  //   // this generates a separate chunk (about.[hash].js) for this route
  //   // which is lazy-loaded when the route is visited.
  //   component: () => import(/* webpackChunkName: "about" */ '../views/cultureTourism/picturePreview/index.vue')
  // }
]

const router = new VueRouter({
  mode: 'hash',
  base: process.env.BASE_URL,
  routes
})

export default router
